package com.android.webframework;

public class RequestObject {
	private String key;
	private Parameter parameters;
	/**
	 * Creates an empty paramter object
	 */
	public RequestObject() {
		this.parameters = new Parameter();
	}
	
	/**
	 * Adds a parameter by key value pair
	 * @param key the String to the pair
	 * @param value the Object to the pair
	 */
	public void addParameter(String key, Object value){
		parameters.insert(key, value);
	}
	
	/**
	 * Gets a parameter
	 * @param key the key to the pair
	 * @return the parameter
	 * @see Object
	 * @throws ObjectNotFoundException
	 */
	public Object getParameter(String key) throws ObjectNotFoundException{
		return parameters.get(key);
	}
	
	/**
	 * Gets the key
	 * @return the key
	 * @see String
	 */
	public String getKey() {
		return key;
	}
	
	/**
	 * Set the key
	 * @param key the key
	 */
	public void setKey(String key) {
		this.key = key;
	}
}
